def encode_request(request)
  request['name'] =
    "projects/#{resource[:project]}/instanceConfigs/#{resource[:name]}"
  request.to_json
end

def self.decode_response(response)
  response = JSON.parse(response.body)
  response['name'] = response['name'].split('/').last
  response
end

def decode_response(response)
  self.class.decode_response(response)
end
